<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>新增用户</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
#@css?("layui")
</head>
<body>
	#if(industry.type == 0)
	<a class="layui-btn layui-btn-radius layui-btn-normal"
		href="javascript:window.history.go(-1);"><i class="layui-icon">&#xe65c;</i>返回</a>
	#end
	<fieldset class="layui-elem-field layui-field-title"
		style="margin-top: 50px;">
		<legend>内容更新</legend>
	</fieldset>

	<form method="POST" action="#(ctx)/admin/industry/update"
		class="layui-form">
		<input type="hidden" name="industry.id" value="#(industry.id)" /> <input
			type="hidden" name="industry.type" value="#(industry.type)" />
		<div class="layui-form-item">
			<label class="layui-form-label">标题</label>
			<div class="layui-input-block">
				<input type="text" name="industry.title" lay-verify="required"
					placeholder="请输入标题" autocomplete="off" class="layui-input"
					value="#(industry.title)">
			</div>
		</div>
		<div class="layui-form-item ">
			<label class="layui-form-label">发布日期</label>
			<div class="layui-input-inline">
				<input type="text" name="industry.indate" id="indate"
					lay-verify="date" placeholder="yyyy-MM-dd" autocomplete="off"
					class="layui-input" value="#date(industry.indate,'yyyy-MM-dd')">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">内容</label>
			<div class="layui-input-block">
				<textarea class="layui-textarea" id="LAY_demo1"
					name="industry.content"> #(industry.content)
       			 </textarea>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-input-block">
				<button class="layui-btn layui-btn-normal" lay-submit=""
					lay-filter="formSub">立即提交</button>
			</div>
		</div>
	</form>
</body>

#@js?("layui")
<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
<script>
	layui
			.use(
					[ 'layedit', 'form', 'laydate' ],
					function() {
						var layedit = layui.layedit, form = layui.form, laydate = layui.laydate;
						//日期
						laydate.render({
							elem : '#indate'
						});
						//构建一个默认的编辑器
						layedit.set({
							uploadImage : {
								url : '#(ctx)/upload/industry'
							}
						});
						var index = layedit.build('LAY_demo1');
					});
</script>
</html>